package com.recharge.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.recharge.core.entity.ProviderApiEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 上游供应商渠道API Mapper 接口
 * </p>
 *
 * @author reagan
 * @since 2020-08-19
 */
@Mapper
public interface ProviderApiMapper extends BaseMapper<ProviderApiEntity> {

    @Select("SELECT spa.*,sp.provider_no FROM sys_provider_api spa LEFT JOIN sys_provider sp ON sp.id = spa.provider_id " +
            "WHERE sp.provider_no = #{providerNo}")
    ProviderApiEntity selectOneByProviderNo(String providerNo);
}
